define(function (require) {
    var $ = require('$')

    function resize() {
        var h = (document.documentElement.clientHeight - 79) + 'px';

        $('.body-wrap').css('height', h);
    }

    resize();

    $(document).resize(function () {
        resize();
    });
   
    $('#upload1').change(function (e) {
        var formData = new FormData();
        var files = e.target.files[0];
        formData.append('file', files);
        $.ajax({
            type: 'POST',
            url: '/co2/Attestation/filesupload',
            data: formData,
            processData: false,
            // 告诉jQuery不要去设置Content-Type请求头
            contentType: false,
            success: function (data) {
                console.log(data);
            },
            error: function (data) {
                console.log(data);
            }
        })
    });

    $('#upload2').change(function (e) {
        var formData = new FormData();
        var files = e.target.files[0];
        formData.append('file', files);
        $.ajax({
            type: 'POST',
            url: '/co2/Attestation/filesupload',
            data: formData,
            processData: false,
            // 告诉jQuery不要去设置Content-Type请求头
            contentType: false,
            success: function (data) {
                console.log(data);
            },
            error: function (data) {
                console.log(data);
            }
        })
    });

    $('#upload3').change(function (e) {
        var formData = new FormData();
        var files = e.target.files[0];
        formData.append('file', files);
        $.ajax({
            type: 'POST',
            url: '/co2/Attestation/filesupload',
            data: formData,
            processData: false,
            // 告诉jQuery不要去设置Content-Type请求头
            contentType: false,
            success: function (data) {
                console.log(data);
            },
            error: function (data) {
                console.log(data);
            }
        })
    });


});